# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Tarn Burton <twburton at gmail dot com>

pkgname=normaliz
pkgver=3.10.0
pkgrel=1
pkgdesc='A tool for computations in affine monoids, vector configurations, lattice polytopes, and rational cones'
arch=(loong64 x86_64)
url='https://www.normaliz.uni-osnabrueck.de/'
license=(GPL)
depends=(e-antic)
makedepends=(nauty)
source=(https://github.com/Normaliz/Normaliz/releases/download/$pkgver/Normaliz-$pkgver.tar.gz)
sha256sums=('6ae8b1e678ed25f055c83eecaba3c6a2536ab0e6746ef171974196763fc9fe86')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  #https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
